Ext.onReady(function(){

    Ext.Ajax.on('requestexception', ErrorHandler.handleFailureMessage, this);
    Ext.Ajax.extraParams = {
            //ticket : Get_Cookie(TICKET_COOKIE)
    };

    var navigationPanel = new NavigationPanel();

    var mainLayout = new Ext.Viewport({
        id:'MainLayout',
        layout:'border',
        defaults:{
            collapseMode:'mini',
            split:true,
            border: true
        },
        renderTo: Ext.getBody(),
        items:[{
            region : 'north',
            xtype : 'headerToolbar',
            collapsible: false,
            margins : '5 5 0 5'
        }, {
            region : 'west',
            xtype : 'navigationPanel',
            collapsible: true,
            width: 285,
            margins : '0 0 5 5'
        }, {
            region : 'center',
            xtype : 'centralCardPanel',
            margins : '0 5 5 0'
        }],
        listeners: {
           afterlayout: function(viewport, layout) {
               var loading=document.getElementById("loading");
               if(loading)document.body.removeChild(loading);
               // eliminate the loading mask so application shows
               var mask=document.getElementById("loading-mask");
               if(mask)document.body.removeChild(mask);
           }
       }
    });

});
